
using Abp.Runtime.Validation;
using System.Collections.Generic;
using Yozeev.Common;
using Yozeev.Dtos;
using Yozeev.SystemConfig;

namespace Yozeev.SystemConfig.Dtos
{
    public class GetMenusInput : PagedSortedAndFilteredInputDto, IShouldNormalize
    {

        //public GetMenusInput(List<QueryData> queryData, string filterText, string sorting, int maxResultCount, int skipCount)
        //{
        //    this.queryData = queryData;
        //    this.Sorting = sorting;
        //    this.MaxResultCount = maxResultCount;
        //    this.SkipCount = SkipCount;
        //}
        ///// <summary>
        ///// DeviceCode,DeviceName,Port
        ///// </summary>
        public List<QueryData> queryData { get; set; }
        /// <summary>
        /// 正常化排序使用
        /// </summary>
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }

    }

    public class GetMenusInputForGet : PagedSortedAndFilteredInputDto, IShouldNormalize
    {
        /// <summary>
        /// MenuName,MenuCode,NavigateUrl,ParentId,IsEnabled
        /// </summary>
        public string queryData { get; set; }
        /// <summary>
        /// 正常化排序使用
        /// </summary>
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }
    }
}
